/* WordPress后台优化样式 */

/* 强制覆盖WordPress默认样式 */
.wrap.wp-spider-monitor-wrap {
    margin: 0;
    padding: 0;
    background: transparent;
}

/* 移除WordPress默认背景 */
.wp-spider-monitor-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 20px;
    margin: -20px -20px -20px -20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    z-index: 1;
}

/* 兼容WordPress后台布局 */
#wpbody-content .wp-spider-monitor-container {
    margin: -20px -20px -20px -22px;
    padding: 20px;
}

/* 标题区域优化 */
.spider-monitor-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    color: white;
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15);
    position: relative;
    overflow: hidden;
}

.spider-monitor-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 卡片样式强制覆盖 */
.spider-card {
    background: white !important;
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
}

.spider-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* 按钮样式强制覆盖 */
.spider-btn,
.button,
.wp-core-ui .button {
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: auto !important;
    line-height: normal !important;
}

.spider-btn-primary,
.wp-core-ui .button-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
}

.spider-btn-primary:hover,
.wp-core-ui .button-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
}

/* 表格样式优化 */
.spider-table {
    background: white !important;
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    margin: 20px 0 !important;
}

.spider-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    padding: 16px !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
}

.spider-table td {
    padding: 16px !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.05) !important;
    color: #475569 !important;
}

/* 表单样式优化 */
.spider-form-group {
    background: white !important;
    padding: 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    margin-bottom: 24px !important;
}

.spider-form-control {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
}

.spider-form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* 图表容器优化 */
.spider-chart-container {
    background: white !important;
    border: 1px solid rgba(59, 130, 246, 0.1) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    margin: 20px 0 !important;
}

/* 响应式布局 */
@media screen and (max-width: 782px) {
    .wp-spider-monitor-container {
        margin: -10px -10px -10px -12px !important;
        padding: 10px !important;
    }
    
    .spider-monitor-header {
        padding: 24px !important;
        margin-bottom: 24px !important;
    }
    
    .spider-card {
        margin-bottom: 16px !important;
    }
}

/* 移除WordPress默认边距 */
.wrap h1 {
    display: none !important;
}

/* 状态消息优化 */
.notice,
.updated,
.error {
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    margin: 20px 0 !important;
    padding: 16px 20px !important;
}

/* 加载动画 */
.spinner {
    border-radius: 50% !important;
    border: 2px solid rgba(59, 130, 246, 0.2) !important;
    border-top-color: #3b82f6 !important;
}

/* 主题预览优化 */
.theme-preview-container {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: 12px !important;
}

.theme-preview {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 3px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.theme-preview:hover {
    transform: scale(1.1) !important;
}

.theme-preview.active {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important;
}